package com.lin.sppringbootdemo.exception;

import com.lin.sppringbootdemo.enums.ResultEnum;

public class TestLinException extends RuntimeException {

    private int code;

    public TestLinException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public TestLinException(ResultEnum em) {
        super(em.getMsg());
        this.code = em.getCode();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
